package br.com.vti.sisp_sicrim.antigo.controller.programa;

import br.com.caelum.vraptor.Get;
import br.com.caelum.vraptor.Post;
import br.com.caelum.vraptor.Path;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;
import br.com.caelum.vraptor.interceptor.download.InputStreamDownload;
import br.com.vti.sisp_sicrim.antigo.util.Sessao;

@Resource
@Path("/antigo/controller")
public class Controller {
	Result result;
	Sessao sessao;

	public Controller(Result result, Sessao sessao) {
		this.result = result;
		this.sessao = sessao;
	}

	@Post
	@Get
	public InputStreamDownload download(Long id) {
		return (InputStreamDownload) sessao.getAtributo(id + "");
	}
}
